package com.yedou.consume;

import com.yedou.entity.po.People;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(topic = "user-topic",
        consumerGroup = "user-consumer-group")
public class UserTopicConsumer implements RocketMQListener<People> {

    @Override
    public void onMessage(People people) {
        System.out.println("接收到用户消息: " + people);
    }
}
